import { createApp } from 'vue';
import App from './App.vue';
import './assets/global.less';
import components from './components/global';
import Router from './router/index';

import * as antIcons from '@ant-design/icons-vue';
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
import { message } from 'ant-design-vue';
import store from './store'

const app = createApp(App)
app.config.productionTip = false

// 全局配置
message.config({
  top: '50px',
  duration: 3,
  maxCount: 1,
});

// components
for (const i in components) {
  app.component(i, components[i])
}
Object.keys(antIcons).forEach(key => {
  app.component(key, antIcons[key])
})
app.config.globalProperties.$antIcons = antIcons

app.config.globalProperties.$receive = []
app.use(Router).use(Antd).use(store).mount('#app')
